package top.zsyle.sycc.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.zsyle.sycc.result.JsonResult;
import top.zsyle.sycc.service.ICreateTokenService;

@RestController
@RequestMapping("/token")
public class CreateToken {

    @Autowired
    private ICreateTokenService createTokenService;

    @RequestMapping(value = "/createToken/{courseIds}",method = RequestMethod.GET)
    public JsonResult createToken(@PathVariable("courseIds")String courseIds){
        return JsonResult.success(createTokenService.createToken(courseIds));
    }
}
